package com.iye.puretennis.custom;

import android.app.DatePickerDialog;
import android.app.Dialog;
import android.app.TimePickerDialog;
import android.content.Context;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentActivity;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.*;
import com.iye.puretennis.R;

import java.util.Calendar;

/**
 * Created with IntelliJ IDEA.
 * User: jing wu
 * Date: 2014/12/9
 * Time: 10:03
 */
public class DateTimePickerWindow extends PopupWindow {

    private View mainView;

    private FragmentActivity fragmentActivity;


    private static final int SHOW_DATA_PICK = 0;
    private static final int DATE_DIALOG_ID = 1;
    private static final int SHOW_TIME_PICK = 2;
    private static final int TIME_DIALOG_ID = 3;

    private int mYear;
    private int mMonth;
    private int mDay;
    private int mHour;
    private int mMinute;


    public DateTimePickerWindow(final Fragment fragment) {
        super(fragment.getActivity());

        fragmentActivity = fragment.getActivity();

        LayoutInflater inflater = (LayoutInflater) fragmentActivity.getSystemService(Context.LAYOUT_INFLATER_SERVICE);

        mainView = inflater.inflate(R.layout.datetime_picker, null);


        final Calendar c = Calendar.getInstance();
        mYear = c.get(Calendar.YEAR);
        mMonth = c.get(Calendar.MONTH);
        mDay = c.get(Calendar.DAY_OF_MONTH);

        mHour = c.get(Calendar.HOUR_OF_DAY);
        mMinute = c.get(Calendar.MINUTE);


    }





}
